﻿using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;
using Boomerang.Common.Tracing;
using System.Diagnostics;
using Boomerang.Service.Threading;

namespace Boomerang.Service
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {


#if (!DEBUG)            
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new BoomerangService() 
			};
            ServiceBase.Run(ServicesToRun);
#else
            // Debug code: this allows the process to run as a non-service.
            // It will kick off the service start point, but never kill it.
            // Shut down the debugger to exit
            ServiceManager manager = new ServiceManager();
            manager.StartService();
            // Put a breakpoint on the following line to always catch
            // your service when it has finished its work
            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
#endif

        }
    }
}
